package com.ximcontroller.automaters;

import com.ximcontroller.controllers.WSController;

public abstract class Automater extends Thread
{
	
	private boolean running;
	private WSController wsc;
	
	public boolean isRunning()
	{
		return running;
	}


	public void setRunning(boolean running)
	{
		this.running = running;
	}
	
	@Override
	public void run()
	{
		while(this.isAlive())
		{
			try
			{
				this.sleep(10);
				this.doLoop();
				
			} catch (InterruptedException e)
			{
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		
	}
	
	public abstract void doLoop();

}
